<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>
<script type="text/javascript">
	$(document).ready(function() {

	});

	//입금확인
	function sendSave() {
		if (confirm("환불금 입금처리하시겠습니까?")) {
			$("#frmData").submit();
		}
	}
	
	//변경된 값을 화면에 표시하고 데이터도 반영한다
	function settingData(){
// 		총반환금액 계산
		var totalRefund = 0;
		
		//객실정보 반영
		$("input[name='penalty_pays']").each(function (i){
			
			$("#view_pays_"+i).html($.comma($(this).val() - $("#add_pay_"+i).val())+"원");
			totalRefund +=$("#total_pay_"+i).val()-$(this).val();
		});
		
		//부가서비스 반영
		$("input[name='penalty_pays1']").each(function (i){
// 			var datap = $("#penalty_pers1_"+i).val()*$("#use_cnts_"+i).val();
// 			var datap = $("#base_pays_"+i).val()*$("#use_cnts_"+i).val();
			var datap = $.frp($("#base_pays_"+i).val() *($("#penalty_pers1_"+i).val()*0.01),3);
			datap=datap*$("#use_cnts_"+i).val();
			$("#view_spays_"+i).html($.comma(datap )+"원");
			totalRefund +=$("#total_pays_"+i).val()-datap;
// 
		});
		
		//수수료 
		$("#ssr_data").html($.comma(totalRefund)+"원");
		
		//환불금		
		$("#last_penalty_pay").html($.comma(${map.total_pay } -totalRefund)+"원");
		$("#penalty_pay").val(${map.total_pay } -totalRefund);
	}
	
	//객실 변경
	function changePer(idx){
		if($("#span_val_per_"+idx).css("display")=="none"){
			//변경
			$("#span_val_per_"+idx).show();
			$("#span_view_per_"+idx).hide();
		}else{
			//적용
			$("#span_val_per_"+idx).hide();
			$("#span_view_per_"+idx).show();
			
			$(".span_view_data_"+idx).html($("#penalty_pers_"+idx).val()+"%");
			var pay = $.frp($("#base_val_"+idx).val() *($("#penalty_pers_"+idx).val()*0.01),3);
			$("#penalty_pays_"+idx).val(Number(pay)+Number($("#add_pay_"+idx).val()));
			
			settingData();
		}
	}
	
	//부가서비스 변경
	function changePerS(idx){
		if($("#span_ser_pers_"+idx).css("display")=="none"){
			//변경
			$("#span_ser_pers_"+idx).show();
			$("#span_service_per_"+idx).hide();

		}else{
			//적용
			$("#span_ser_pers_"+idx).hide();
			$("#span_service_per_"+idx).show();
			$(".span_ser_per_"+idx).html($("#penalty_pers1_"+idx).val()+"%");
			
			var pay = ($.frp($("#base_pays_"+idx).val() *($("#penalty_pers1_"+idx).val()*0.01),3));
			
			pay = pay * $("#use_cnts_"+idx).val();
			$("#penalty_pays1_"+idx).val(pay);
			
			settingData();
		}
	}
	
	//퍼센트 설정
	function changePercent(me){
		if($(me).val()==''){
			alert("환불율을 입력하세요");
			return false;
		}else{
			$("input[name='penalty_pers']").val($(me).val());
			
			$("input[name='penalty_pays']").each(function (i){
				$(".span_view_data_"+i).html($("#penalty_pers_"+i).val()+"%");
				var pay = $.frp($("#base_val_"+i).val() *($("#penalty_pers_"+i).val()*0.01),3);
				$("#penalty_pays_"+i).val(Number(pay)+Number($("#add_pay_"+i).val()));
			});
						
			settingData();
		}
		
	}
</script>
<form method="post" action="./pere702T.do" id="frmData"
	name="frm">
	<input name="p_id" value="${param.p_id }" type="hidden"/>
	<input name="re_no" value="${param.re_no }" type="hidden"/>
	<table width="100%" border="0" cellspacing="0" cellpadding="10">
		<tr>
			<td>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td><span class="blueb">※</span><strong> 객실예약 확인</strong></td>
					</tr>
					<tr>
						<td height="5"></td>
					</tr>
					<tr>
						<td><table width="100%" border="0" cellspacing="4"
								cellpadding="1" bgcolor="#edecec">
								<tr>
									<td bgcolor="#FFFFFF"><table width="100%" border="0"
											cellspacing="0" cellpadding="0">
											<tr align="center">
												<td width="10%" class="borderbg" height="35" bgcolor="#f5f5f5"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">객실명</td>
														</tr>
													</table></td>
												<td width="14%" bgcolor="#f5f5f5" class="borderlbg"><table
														width="100%" border="0" cellspacing="0" cellpadding="0">
														<tr align="center">
															<td height="18" class="borderbg bold">이용일자</td>
														</tr>
														<tr>
															<td height="1" bgcolor="#FFFFFF"></td>
														</tr>
														<tr align="center">
															<td height="16" class="bold">예약일자</td>
														</tr>
													</table></td>
												<td width="9%" bgcolor="#f5f5f5" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">이용기간</td>
														</tr>
													</table></td>
												<td width="10%" bgcolor="#f5f5f5" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">기준/예약</td></tr>
													</table></td>
												<td width="13%" bgcolor="#f5f5f5" class="borderlbg"><table
														width="100%" border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td height="18" colspan="2" class="borderbg" align="center"><table
																	border="0" cellspacing="0" cellpadding="0">
																	<tr>
																		<td align="center" class="bold"
																			style="padding-top: 2px;">이용인원</td>
																	</tr>
																</table></td>
														</tr>
														<tr>
															<td height="1" colspan="2" bgcolor="#FFFFFF"></td>
														</tr>
														<tr align="center">
															<td width="50%" height="16"><table border="0"
																	cellspacing="0" cellpadding="0">
																	<tr>
																		<td align="center" class="bold"
																			style="padding-top: 2px;">성인</td>
																	</tr>
																</table></td>
															<td width="50%" style="border-left-color: #c0c0bf;border-left-width: 1px;border-left-style: solid;"><table border="0"
																	cellspacing="0" cellpadding="0">
																	<tr>
																		<td align="center" class="bold"
																			style="padding-top: 2px;">아동</td>
																	</tr>
																</table></td>
														</tr>
													</table></td>
												<td width="11%" bgcolor="#f5f5f5" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">기본요금</td>
														</tr>
													</table></td>
												<td width="11%" bgcolor="#f5f5f5" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">추가요금</td>
														</tr>
													</table></td>
												<td width="10%" bgcolor="#f5f5f5" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">할인요금</td>
														</tr>
													</table></td>
												<td width="12%" bgcolor="#f5f5f5" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">합계</td>
														</tr>
													</table></td>
											</tr>
											<tr>
												<td height="1" colspan="9" bgcolor="#FFFFFF"></td>
											</tr>
	<c:set var="totalPayD1" value="0"/>
	<c:set var="addPay" value="0"/>
	<c:set var="totalPayD2" value="0"/>
	<c:if test="${list !=null && fn:length(list)>0 }">
		<c:forEach var="map1" items="${list}" varStatus="status">
			<c:set var="addPay" value="${addPay +map1.add_pay }"/>
			<c:set var="totalPayD1" value="${totalPayD1+map1.total_pay -map1.add_pay }"/>
											<tr align="center">
												<td height="30" bgcolor="#ffffff" class="borderbg"><table
														width="100%" border="0" cellspacing="0" cellpadding="0">
														<tr align="center">
															<!--td width="20"><input type="checkbox" name="checkbox3" id="checkbox3"></td-->
															<td><table border="0" cellspacing="0"
																	cellpadding="0">
																	<tr>
																		<td align="center" class="greenb2">${map1.room_nm }</td>
																	</tr>
																</table></td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														width="100%" border="0" cellpadding="0" cellspacing="0">
														<tr>
															<td align="center" class="greenb2">
${fn:substring(map1.reservation_dt,0,4) }년
${fn:substring(map1.reservation_dt,4,6) }월
${fn:substring(map1.reservation_dt,6,8) }일
															</td>
														</tr>
														<tr>
															<td height="1" bgcolor="#c0c0bf"></td>
														</tr>
														<tr>
															<td align="center" class="greenb2">
${fn:substring(map1.reg_dt,2,4) }년
${fn:substring(map1.reg_dt,4,6) }월
${fn:substring(map1.reg_dt,6,8) }일
															</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2">1박</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2">${map1.use_man_cnt}/${map1.man_cnt+map1.chi_cnt }</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														width="100%" border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td width="50%" height="30" align="center"><table
																	border="0" cellspacing="0" cellpadding="0">
																	<tr>
																		<td align="center" class="greenb2">${map1.man_cnt}명</td>
																	</tr>
																</table></td>
															<td width="50%" align="center" class="borderlg"><table
																	border="0" cellspacing="0" cellpadding="0">
																	<tr>
																		<td align="center" class="greenb2">${map1.chi_cnt}명</td>
																	</tr>
																</table></td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2"><fmt:formatNumber value="${map1.base_pay}" pattern="#,###"/>원</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2"><fmt:formatNumber value="${map1.add_pay}" pattern="#,###"/>원</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2"><fmt:formatNumber value="${map1.dc_pay}" pattern="#,###"/>원</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2"><fmt:formatNumber value="${map1.total_pay}" pattern="#,###"/>원</td>
														</tr>
													</table></td>
											</tr>		
		</c:forEach>
	</c:if>

										</table></td>
								</tr>
							</table></td>
					</tr>
				</table>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td><span class="blueb">※</span><strong> 부가서비스 확인</strong></td>
					</tr>
					<tr>
						<td height="5"></td>
					</tr>
					<tr>
						<td><table width="100%" border="0" cellspacing="4"
								cellpadding="1" bgcolor="#edecec">
								<tr>
									<td bgcolor="#FFFFFF"><table width="100%" border="0"
											cellspacing="0" cellpadding="0">
											<tr align="center">
												<td width="17%" height="35" class="borderbg" bgcolor="#f5f5f5"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">서비스명</td>
														</tr>
													</table></td>
												<td width="13%" bgcolor="#f5f5f5" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">주문수</td>
														</tr>
													</table></td>
												<td width="41%" bgcolor="#f5f5f5" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">요구사항</td>
														</tr>
													</table></td>
												<td width="13%" bgcolor="#f5f5f5" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">가격</td>
														</tr>
													</table></td>
												<td width="16%" bgcolor="#f5f5f5" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="bold">합계</td>
														</tr>
													</table></td>
											</tr>
											<tr>
												<td height="1" colspan="5" bgcolor="#FFFFFF"></td>
											</tr>
	<c:if test="${rList !=null && fn:length(rList)>0 }">
		<c:forEach var="map1" items="${rList}" varStatus="status">
			<c:set var="totalPayD2" value="${totalPayD2+map1.total_pay  }"/>
											<tr align="center">
												<td height="30" class="borderbg" bgcolor="#ffffff"><table width="100%"
														border="0" cellspacing="0" cellpadding="0">
														<tr align="center">
															<!--td width="20"><input type="checkbox" name="checkbox5" id="checkbox5"></td-->
															<td><table border="0" cellspacing="0"
																	cellpadding="0">
																	<tr>
																		<td align="center" class="greenb2">${map1.as_nm }</td>
																	</tr>
																</table></td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2">${map1.use_cnt }${map1.as_unit }</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2">${map1.req_msg }</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2"><fmt:formatNumber value="${map1.base_pay }" pattern="#,###"/>원</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2"><fmt:formatNumber value="${map1.total_pay }" pattern="#,###"/>원</td>
														</tr>
													</table></td>
											</tr>
		</c:forEach>
	</c:if>
										</table></td>
								</tr>
							</table></td>
					</tr>
				</table>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td><table width="100%" border="0" cellspacing="4"
								cellpadding="1" bgcolor="#edecec">
								<tr>
									<td bgcolor="#FFFFFF"><table width="100%" border="0"
											cellspacing="0" cellpadding="0">
											<tr align="center">
												<td width="65%" height="35" bgcolor="#f5f5f5"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="dgrayb">구분</td>
														</tr>
													</table></td>
												<td width="35%" bgcolor="#f5f5f5" class="borderlb"><table
														border="0" cellpadding="0" cellspacing="0">
														<tr>
															<td align="center" class="dgrayb">금액</td>
														</tr>
													</table></td>
											</tr>
											<tr>
												<td height="1" colspan="2" bgcolor="#C0C0BF"></td>
											</tr>
											<tr align="center">
												<td height="30" bgcolor="#ffffff" class="borderbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2">객실기본요금합계</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2"><fmt:formatNumber value="${totalPayD1 }" pattern="#,###"/>원</td>
														</tr>
													</table></td>
											</tr>
											<tr align="center">
												<td height="30" bgcolor="#ffffff" class="borderbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2">추가요금합계</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2"><fmt:formatNumber value="${addPay }" pattern="#,###"/>원</td>
														</tr>
													</table></td>
											</tr>
<!-- 											<tr align="center"> -->
<!-- 												<td height="30" bgcolor="#ffffff" class="borderbg"><table -->
<!-- 														border="0" cellspacing="0" cellpadding="0"> -->
<!-- 														<tr> -->
<!-- 															<td align="center" class="greenb2">할인요금합계</td> -->
<!-- 														</tr> -->
<!-- 													</table></td> -->
<!-- 												<td bgcolor="#ffffff" class="borderlbg"><table -->
<!-- 														border="0" cellspacing="0" cellpadding="0"> -->
<!-- 														<tr> -->
<!-- 															<td align="center" class="blueb">-0원</td> -->
<!-- 														</tr> -->
<!-- 													</table></td> -->
<!-- 											</tr> -->
											<tr align="center">
												<td height="30" bgcolor="#ffffff" class="borderbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2">부가서비스요금합계</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlbg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2"><fmt:formatNumber value="${totalPayD2 }" pattern="#,###"/>원</td>
														</tr>
													</table></td>
											</tr>
											<tr align="center">
												<td height="30" bgcolor="#ffffff"><table border="0"
														cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2">결제금액</td>
														</tr>
													</table></td>
												<td bgcolor="#ffffff" class="borderlg"><table
														border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2"><fmt:formatNumber value="${totalPayD1+addPay+totalPayD2 }" pattern="#,###"/>원</td>
														</tr>
													</table></td>
											</tr>
										</table></td>
								</tr>
							</table></td>
					</tr>
				</table>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td><table border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td width="10" height="20" align="right" valign="top"><table
											width="5" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td bgcolor="#60C930" height="10"></td>
											</tr>
										</table></td>
									<td valign="bottom" class="padl5"><strong>예약자 정보</strong></td>
								</tr>
							</table></td>
					</tr>
					<tr>
						<td height="5"></td>
					</tr>
					<tr>
						<td><table width="100%" border="0" cellpadding="0"
								cellspacing="1" bgcolor="#d8d8d8">
								<tr>
									<td width="130" height="3" bgcolor="#60c930"></td>
									<td></td>
								</tr>
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">예약자명</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">${map.reservation_nm }
										<c:if test="${'A'==map.add_type }">
										<span class="ptrend">[관리자]</span>
										</c:if>
									</td>
								</tr>
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">휴대폰</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">${map.r_phone1 }-${map.r_phone2 }-${map.r_phone3 }
									
									</td>
								</tr>
							<c:if test="${'Y'==pensionInfo.pickup_yn }">
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">픽업요청</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">픽업장소:
										${map.pickup }&nbsp;&nbsp;&nbsp;픽업시간: ${map.pick_info }</td>
								</tr>
							</c:if>
							<c:if test="${'Y'==pensionInfo.end_time_yn }">
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">펜션도착시간</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">
											${map.end_time } 
										<c:if test="${map.pickup_yn=='Y' }">픽업요청함</c:if>
									</td>
								</tr>
							</c:if>
							<c:if test="${'Y'==pensionInfo.email_yn }">
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">E - MAIL</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">
										<c:if test="${(''!=map.r_email2 && ''!=map.r_email1) }">
										${map.r_email1 }@${map.r_email2 }
										</c:if>
									</td>
								</tr>
							</c:if>
							<c:if test="${'Y'==pensionInfo.start_time_yn }">
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">출발지역</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">${map.start_area }</td>
								</tr>
							</c:if>
							<c:if test="${'Y'==pensionInfo.etc_req_yn }">
								<tr>
									<td height="60" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">기타요청사항</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">${reservationInfo.etc_req }</td>
								</tr>
							</c:if>
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">결제방법</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30"><table border="0"
											cellspacing="0" cellpadding="0">
											<tr>
												<td class="paddtop4">BANK</td>
											</tr>

										</table></td>
								</tr>
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">*환불신청일</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">
										${map.refunds_reg_dt }
									</td>
								</tr>
							</table></td>
					</tr>
				</table>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td><table border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td width="10" height="20" align="right" valign="top"><table
											width="5" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td bgcolor="#0099FF" height="10"></td>
											</tr>
										</table></td>
									<td valign="bottom" class="padl5"><strong>무통장 입금</strong></td>
								</tr>
							</table></td>
					</tr>
					<tr>
						<td height="5"></td>
					</tr>
					<tr>
						<td><table width="100%" border="0" cellpadding="0"
								cellspacing="1" bgcolor="#d8d8d8">
								<tr>
									<td width="130" height="3" bgcolor="#0099FF"></td>
									<td></td>
								</tr>
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">입금은행</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">${map.send_bank }</td>
								</tr>
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">입금자명</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">${map.send_bank_nm }</td>
								</tr>
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">입금대기시간</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30"><span class="pld">입금완료</span></td>
								</tr>
	<c:if test="${list !=null && fn:length(list)>0 }">
		<c:forEach var="map1" items="${list}" varStatus="status">
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">
													<c:if test="${status.index==0 }">취소수수료</c:if>
														<div style="display: none ;">
															no<input name="rrc_nos" value="${map1.rrc_no }" type="text"/>
															p<input name="penalty_pays" id="penalty_pays_${status.index }" value="${map1.penalty_pay }" type="text"/>
															<input id="base_val_${status.index }" value="${map1.base_pay-map1.dc_pay }" type="text"/>
															<input id="add_pay_${status.index }" value="${map1.add_pay }" type="text"/>
															<input id="total_pay_${status.index }" value="${map1.total_pay }" type="text"/>
														</div>
												</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30"><table width="100%"
											border="0" cellpadding="0" cellspacing="0">
											<tr align="right">
												<td width="10%" align="left"><table border="0"
														cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2">${map1.room_nm }</td>
														</tr>
													</table></td>
												<td width="9%" align="right">${map1.dateCha } 일전</td>
												<td width="9%" align="right" class="red">
													<span id="span_val_per_${status.index }" style="display: none;"><input name="penalty_pers" id="penalty_pers_${status.index }" value="${map1.penalty_per }" type="text" size="3"/></span>
													<span id="span_view_per_${status.index }" class="span_view_data_${status.index }">${map1.penalty_per }%</span>
													
												</td>
												<td width="5%" align="right">환불</td>
												<td width="20%" align="right">
												<fmt:formatNumber value="${map1.total_pay - map1.add_pay }" pattern="#,###"/>
												원 /</td>
												<td width="7%" align="right" class="greenb">
													<span class="span_view_data_${status.index }">${map1.penalty_per }%</span>
												</td>
												<td width="2%" align="right">=</td>
												<td width="14%" align="right" class="blueb" id="view_pays_${status.index }"><fmt:formatNumber value="${map1.penalty_pay-map1.add_pay }" pattern="#,###"/>원</td>
												<td width="6%" align="right" class="pld">환불</td>
												<td width="18%" style="padding-right: 10px;">
													<a href="#" onClick="javascript:changePer('${status.index}');return false;"><img src="/pmgr/images/res_btn_charge.gif" width="68" height="18"></a>
												</td>
											</tr>
										</table></td>
								</tr>
		</c:forEach>
	</c:if>

								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">부가서비스</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30"><table width="100%"
											border="0" cellpadding="0" cellspacing="0">
	<c:if test="${rList !=null && fn:length(rList)>0 }">
		<c:forEach var="map1" items="${rList}" varStatus="status">
											<tr align="right">
												<td width="15%" align="left"><table border="0"
														cellspacing="0" cellpadding="0">
														<tr>
															<td align="center" class="greenb2">${map1.as_nm }
																<div style="display: none ;">
																	rm_no<input name="rm_nos" value="${map1.rm_no }" type="text"/>
																	as_no<input name="as_nos" id="as_no_${status.index }" value="${map1.as_no }" type="text"/>
																	penalty_pays1<input name="penalty_pays1" id="penalty_pays1_${status.index }" value="${map1.penalty_pay }" type="text"/>
																	<input id="use_cnts_${status.index }" value="${map1.use_cnt }" type="text"/>
																	<input id="base_pays_${status.index }" value="${map1.base_pay }" type="text"/>
																	<input id="total_pays_${status.index }" value="${map1.total_pay }" type="text"/>
																</div>
															</td>
														</tr>
													</table></td>
												<td width="4%" align="right"></td>
												<td width="9%" align="right" class="red">
													<span id="span_ser_pers_${status.index}" style="display: none;" ><input name="penalty_pers1" id="penalty_pers1_${status.index}" value="${map1.penalty_per }" type="text" size="3"/></span>
													<span class="span_ser_per_${status.index}" id="span_service_per_${status.index}">${map1.penalty_per }%</span>
												</td>
												<td width="5%" align="right">환불</td>
												<td width="20%" align="right">(<fmt:formatNumber value="${map1.base_pay }" pattern="#,###"/>*${map1.use_cnt })원 /</td>
												<td width="7%" align="right" class="greenb">
													<span class="span_ser_per_${status.index}">${map1.penalty_per }%</span>
												</td>
												<td width="2%" align="right">=</td>
												<td width="14%" align="right" class="blueb" id="view_spays_${status.index }">
													
													<fmt:formatNumber value="${map1.penalty_pay }" pattern="#,###"/>원
												</td>
												<td width="6%" align="right" class="pld">환불</td>
												<td width="18%" style="padding-right: 10px;">
<%-- 													<a href="#" onClick="javascript:changePerS('${status.index}');return false;"><img src="/pmgr/images/res_btn_charge.gif" width="68" height="18"></a> --%>
												</td>
											</tr>
		</c:forEach>
	</c:if>
										</table></td>
								</tr>
							</table></td>
					</tr>
				</table>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td height="28" align="right" style="padding-right: 10px;"><table
								border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td >
										<label><input type="radio" name="n1"
											value="100" onClick="changePercent(this)">
										수수료적용 안함(100%환불)</label>
										
										<label><input type="radio" name="n1"
											value="70" onClick="changePercent(this)">
										70%환불</label>
										
										<label><input type="radio" name="n1"
											value="50" onClick="changePercent(this)">
										50%환불</label>
										
										<label><input type="radio" name="n1"
											value="30" onClick="changePercent(this)">
										30%환불</label>
										
										<label><input type="radio" name="n1"
											value="10" onClick="changePercent(this)">
										10%환불</label>
										
										<input name="n1" onKeyup="changePercent(this)"
											type="text" value="" id="textfield3" size="7" maxlength=3>
										%
<!-- 										<img src="/usr/images/res_btn_apply.gif" width="36" -->
<!-- 											height="18" align="middle" -->
<!-- 											onClick="allChangeRef(document.frm.allChangeText.value,'text')" -->
<!-- 											style="cursor: hand"> -->
										<input id="penalty_pay" name="penalty_pay" value="${map.penalty_pay }" type="hidden" />
									</td>
								</tr>
							</table></td>
					</tr>
					<tr>
						<td height="28" align="right" style="padding-right: 10px;"><table
								border="0" cellspacing="0" cellpadding="0">
								<tr align="right">
									<td width="40">입금액</td>
									<td width="75" class="pld"><fmt:formatNumber value="${map.total_pay }" pattern="#,###"/>원</td>
									<td width="50">- 수수료</td>
									<td width="75" class="blueb" id="ssr_data"><fmt:formatNumber value="${map.total_pay-map.penalty_pay }" pattern="#,###"/>원</td>
									<td width="10">=</td>
									<td width="75" class="pld" id="last_penalty_pay">
										<fmt:formatNumber value="${map.penalty_pay }" pattern="#,###"/>원</td>
									<td width="25">환불</td>
								</tr>
							</table></td>
					</tr>
				</table>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td><table border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td width="10" height="20" align="right" valign="top"><table
											width="5" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td bgcolor="#0099FF" height="10"></td>
											</tr>
										</table></td>
									<td valign="bottom" class="padl5"><strong>환불계좌</strong></td>
								</tr>
							</table></td>
					</tr>
					<tr>
						<td height="5"></td>
					</tr>
					<tr>
						<td><table width="100%" border="0" cellpadding="0"
								cellspacing="1" bgcolor="#d8d8d8">
								<tr>
									<td width="130" height="3" bgcolor="#0099FF"></td>
									<td></td>
								</tr>
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">환불계좌</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">
										${map.account_type_nm } ${map.account_no } 
									</td>
								</tr>
								<tr>
									<td height="30" align="center" bgcolor="#ffffff"><table
											border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="center" class="greenb2">예금자명</td>
											</tr>
										</table></td>
									<td bgcolor="#FFFFFF" class="padl30">${map.account_usr_nm }</td>
								</tr>
							</table></td>
					</tr>
				</table>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td align="center">
							<table width="100" border="0" cellspacing="0" cellpadding="2">
								<tr>
									<td><img src="/camping/img/res_btn_repay.gif" width="114"
										height="36" onClick="sendSave();" style="cursor: hand"></td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td align="center">&nbsp;</td>
					</tr>
					<tr>
						<td height="3" bgcolor="#86ad29"></td>
					</tr>
					<tr>
						<td style="padding-top: 2px;"><%@ include file="/WEB-INF/jsp/usr/pe/re/footer.jsp"%></td>
					</tr>
				</table></td>
		</tr>
	</table>
</form>
